package com.itcast.springboot.service;

import com.itcast.springboot.bean.Friend;
import com.itcast.springboot.bean.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface FriendService {
    //增
    public Integer insertFriend(Friend friend);

    //删
    public Integer deleteFriend(Integer fid);

    //取消关注：通过用户id和好友id删除friend表对应信息
    public Integer deleteFriendByUidAndFid(String uid, String friendId);

    //查
    public Friend getFriendById(Integer fid);

    //通过id查询对应好友的id和姓名
    public List<Friend> getFriendsAndNames(String uid);

    //判断是否为好友
    public List<String> isFriendsByUids(String uid, List<String> fids);

    //多个count查询：多个好友id查询被加为好友的次数
    public List<Integer> getCountsByfids(List<String> fids);

    //判断某个用户是否存在某个好友
    public Integer getExistFriend(String uid, String fid);

    //改
    public Integer updateFriend(Friend friend);
}
